﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mammoo.Ajax
{
    public class AjaxResult
    {
        /// <summary>
        /// 方法执行状态
        /// </summary>
        public ReturnStatus success = ReturnStatus.Success;

        /// <summary>
        /// 数据
        /// </summary>
        public object data = null;
        /// <summary>
        /// 消息
        /// </summary>
        public string msg = "";

        /// <summary>
        /// 实例化
        /// </summary>
        public AjaxResult()
        {
        }

        /// <summary>
        /// 实例化
        /// </summary>
        /// <param name="data">数据</param>
        /// <param name="msg">消息</param>
        public AjaxResult(object data, string msg)
        {
            this.data = data;
            this.msg = msg;
        }

        /// <summary>
        /// 实例化
        /// </summary>
        /// <param name="data">数据</param>
        public AjaxResult(object data)
        {
            this.data = data;
        }

        /// <summary>
        /// 实例化
        /// </summary>
        /// <param name="msg">消息</param>
        public AjaxResult(string msg)
        {
            this.msg = msg;
        }
    }
}
